package ec_si_template;

/**
 * All parameters are set in this file
 * @author Andreas Janecek
 *
 */
public class Config {
	
	// GENERAL PARAMETERS
	
	/**
	 *  Size of the swarm / population
	 */
	public final static int nPop = 30;

	/**
	 *  Dimension of the objective function
	 */
	public static final int dim = 30;

	/**
	 *  Maximum number of function evaluations
	 */
	public static final long max_evaluations = (long) 300000;
	
	
	// ALGORITHM SPECIFIC PARAMETERS
	
	
	
	// OUTPUT AND PLOTTING AND WRITING TO FILE
	
	/**
	 *  Console output: 0: no output; 1: only fitness; 2: fitness and position
	 */
	public static final int ouputLevel = 0;

	/**
	 *  If set to true the position of individuals in each iteration are written to file "fileName" - see below
	 */
	public static final boolean printToFile = true;

	/**
	 *  If set to true the fitness history will be shown as a plot
	 */
	public static final boolean plotFitnessHistory = true;
	
	/**
	 * Chance of mutation in percentage (%).  
	 */
	public static final double chanceOfMutation = 5;
	public static final int dimensionsToUpdate = 1;
	public static final int crossoverRate = 90;
	
	public static final Selection_type selType = Selection_type.ELITISMO;
	
	public static final Selection_type offspringSelType = Selection_type.ELITISMO;
	public static Mutation_type mutation_function = Mutation_type.UNIFORME;
	
	public static enum Selection_type{
	 ELITISMO,
	 ALEATORIO,
	 ROLETA,
	 TORNEIO;
	}
	
	public static enum Mutation_type{
		 GAUSSIANA,
		 UNIFORME;
		}
	
}
